<?php 
$temp = 0;
foreach ($query->result() as $res):
	$images = site_url("images/noimages.jpg");
	if($res->id_help!=""){
		if($temp=='#eee'){
	 		$bg='#ccc';
			$bgcount = '#FFEE79';
	 		$temp = 1;
	 	} else {
	 		$bg='#eee';
			$bgcount = '#FFFABB';
	 		$temp = 0;
		}
	}
		
		$q = $this->db->query("select id_member,username from member where id_member='$res->author' limit 1");
		foreach ($q->result() as $re):
				$res->author = $re->username;
				$images = site_url(array('just4u','ImagesSmall','member',$re->id_member));
		endforeach;
	
	$res->question = word_limiter($res->question,40);
	$res->answer = word_limiter($res->answer,40);
	
?>
  <tr bgcolor="<?php echo $bg?>">
    <td align="center" valign="top" class="marginContent">
      <img class="images" src="<?php echo $images ?>" />
    </td>
    <td width="93%" valign="top" class="marginContent">
     <h2><b><?php echo $res->title ?></b></h2><br>
     <?php echo "<b>Question : </b><br>".$res->question ?><br><br>
     <?php echo "<b>From : ".$res->from." / ".$res->email ?></b><br><br>
     <?php echo "<b>Answer : </b>".$res->answer ?><br>
     <em><?php echo "posted by : ".$res->author." at ".$res->posted?></em>
    </td>
    <td valign="top" class="marginContent" align="center">
    	<a class="uiButtonRounded" href="<?php echo site_url(array('just4u','help_edit',$res->id_help))?>">Edit</a><br><br>
      	<a class="uiButtonRounded" href="javascript: delete_help('<?php echo $res->id_help?>')">Delete</a></td>
  </tr>
<?php 
endforeach;
?>

